/**
 * C Programming: A Modern Approach
 *
 * version: 2nd
 * author: K.N.King
 * http://knking.com/books/c2
 */

#include <stdio.h>

/**
 * Computes the dimensional weight of a box
 * from input provided by the user
 */

int main(void) {
    int height;
    int length;
    int width;
    int volume;
    int weight;

    // Get height
    printf("Enter height of box: ");
    scanf("%d", &height);

    // Get lenght
    printf("Enter length of box: ");
    scanf("%d", &length);

    // Get width
    printf("Enter width of box: ");
    scanf("%d", &width);

    volume = height * length * width;
    weight = (volume + 165) / 166;

    printf("Volume (cubic inches): %d\n", volume);
    printf("Dimensional weight (pounds): %d\n", weight);

    return 0;
}

/*
output:
Enter height of box: 8
Enter length of box: 12
Enter width of box: 10
Volume (cubic inches): 960
Dimensional weight (pounds): 6
*/